package top.leyi.utils;

public class Result<T> {
     private int code;
     private T  data;
     private String msg;

     public  Result(int code, String msg){
         this.code = code;
         this.msg = msg;
     }

     public  Result(int code, String msg, T data){
         this.code = code;
         this.msg = msg;
         this.data = data;
     }
    public  Result(int code,  T data){
        this.code = code;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", data=" + data +
                ", msg='" + msg + '\'' +
                '}';
    }
}
